package com.db.concurrency;

import java.util.concurrent.atomic.AtomicLong;

public class AtomicCounter implements Counter {

  private AtomicLong counter = new AtomicLong();
  
  public AtomicCounter() {
  }
  
  @Override
  public void increment() {
    counter.incrementAndGet();
  }

  @Override
  public long getCounter() {
    return counter.get();
  }
  
}
